package com.newasia.management.converter;

import com.newasia.management.dal.user.entitys.SysUser;
import com.newasia.management.dal.user.entitys.UserAndRole;
import com.newasia.management.dto.user.SysUserDto;
import com.newasia.management.dto.user.UserRoleListDto;
import com.newasia.management.dto.user.login.SysUserLoginResponse;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public interface SysUserConverter {

    @Mappings({})
    SysUserLoginResponse user2Res(SysUser user);

    @Mappings({})
    UserRoleListDto userRole2Dto(UserAndRole user);

    List<UserRoleListDto> userRole2Dto(List<UserAndRole> users);

    @Mappings({})
    SysUserDto user2Dto(SysUser user);

    List<SysUserDto> user2Dto(List<SysUser> users);
    /*@Mappings({})
    AddressDetailResponse address2Res(Address address);

    List<AddressDto> address2List(List<Address> addresses);

    @Mappings({})
    Address req2Address(AddAddressRequest request);

    @Mappings({})
    Address req2Address(UpdateAddressRequest request);*/

}
